<?php

if ((!defined('NV_SYSTEM')) AND (!defined('NV_ADMIN'))) {
    Header("Location: ../index.php");
    exit;
}

global $adminfold, $adminfile, $prefix, $db, $admin, $Home_Module;
    $main_module = $Home_Module;
    

    if (defined('IS_ADMIN')) {
    $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"".INCLUDE_PATH."".$adminfold."/".$adminfile.".php\">"._ADMINPAGE."</a><br>\n";
    }
    $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"".INCLUDE_PATH."index.php\">"._HOME."</a><br>\n";
    if (defined('IS_USER')) {
    $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"".INCLUDE_PATH."modules.php?name=Your_Account\">"._USERPAGE."</a><br>\n";
    }
    else {
    $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"".INCLUDE_PATH."modules.php?name=Your_Account&op=new_user\">"._NEWREG."</a><br>\n";
    }
    $sql = "SELECT title, custom_title, view FROM ".$prefix."_modules WHERE active='1' AND title!='$def_module' AND title!='Your_Account' AND inmenu='1' ORDER BY custom_title ASC";
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
	$m_title = $row[title];
	$custom_title = $row[custom_title];
	$view = $row[view];
	$m_title2 = ereg_replace("_", " ", $m_title);
	if ($custom_title != "") {
	    $m_title2 = $custom_title;
	}
	if ($m_title != $main_module) {
	    if ((defined('IS_ADMIN') AND $view == 2) OR $view != 2) {
		$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"".INCLUDE_PATH."modules.php?name=$m_title\">$m_title2</a><br>\n";
	    }
	}
    }


?>
